package com.ruoyi.st.service.impl;

import com.ruoyi.st.domain.StMenuCat;
import com.ruoyi.st.mapper.StMenuCatMapper;
import com.ruoyi.st.service.IStMenuCatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 菜单分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-06
 */
@Service
public class StMenuCatServiceImpl implements IStMenuCatService 
{
    @Autowired
    private StMenuCatMapper stMenuCatMapper;

    /**
     * 查询菜单分类
     * 
     * @param id 菜单分类主键
     * @return 菜单分类
     */
    @Override
    public StMenuCat selectStMenuCatById(Long id)
    {
        return stMenuCatMapper.selectStMenuCatById(id);
    }

    /**
     * 查询菜单分类列表
     * 
     * @param stMenuCat 菜单分类
     * @return 菜单分类
     */
    @Override
    public List<StMenuCat> selectStMenuCatList(StMenuCat stMenuCat)
    {
        return stMenuCatMapper.selectStMenuCatList(stMenuCat);
    }

    /**
     * 新增菜单分类
     * 
     * @param stMenuCat 菜单分类
     * @return 结果
     */
    @Override
    public int insertStMenuCat(StMenuCat stMenuCat)
    {
        return stMenuCatMapper.insertStMenuCat(stMenuCat);
    }

    /**
     * 修改菜单分类
     * 
     * @param stMenuCat 菜单分类
     * @return 结果
     */
    @Override
    public int updateStMenuCat(StMenuCat stMenuCat)
    {
        return stMenuCatMapper.updateStMenuCat(stMenuCat);
    }

    /**
     * 批量删除菜单分类
     * 
     * @param ids 需要删除的菜单分类主键
     * @return 结果
     */
    @Override
    public int deleteStMenuCatByIds(Long[] ids)
    {
        return stMenuCatMapper.deleteStMenuCatByIds(ids);
    }

    /**
     * 删除菜单分类信息
     * 
     * @param id 菜单分类主键
     * @return 结果
     */
    @Override
    public int deleteStMenuCatById(Long id)
    {
        return stMenuCatMapper.deleteStMenuCatById(id);
    }
}
